<template>
  <div>
    <div class="banner" @click="handleBannerClick">
      <img src="http://img1.qunarzz.com/sight/p0/2106/b3/b378c7fe908c5aada3.img.jpg_250x250_2fb0ecde.jpg" alt="" class="banner-img">
      <div class="banner-info">
        <div class="title">长隆动物园</div>
        <div class="number"><span class="iconfont icon">&#xe652;</span>{{imgs.length}}</div>
      </div>
    </div>
    <fade-animaiton>
      <common-gallary
        :imgs=imgs
        v-show="showGallary"
        @close="closeGallary"
      ></common-gallary>
    </fade-animaiton>
  </div>
</template>

<script>
import CommonGallary from 'common/gallary/Gallary'
import FadeAnimaiton from 'common/fade/FadeAnimaiton'
export default {
  name: 'DetailBanner',
  props: {
    imgs: Array
  },
  data () {
    return {
      showGallary: false
    }
  },
  components: {
    CommonGallary,
    FadeAnimaiton
  },
  methods: {
    handleBannerClick () {
      this.showGallary = true
    },
    closeGallary () {
      this.showGallary = false
    }
  }
}
</script>

<style lang="stylus"  scoped>
  .banner
    position relative
    overflow hidden
    height 55vw
    .banner-img
      width 100%
    .banner-info
      position absolute
      left 0
      bottom 0
      width 100%
      height .6rem
      padding .24rem
      display flex
      align-items center
      color #fff
      box-sizing border-box
      background-image linear-gradient(rgba(0,0,0,0), rgba(0,0,0,0.8))
      .title
        flex 1
        font-size .32rem
      .number
        display flex
        align-items center
        padding .02rem .24rem
        height .32rem
        line-height .32rem
        border-radius .2rem
        background rgba(0, 0, 0, .8)
        font-size .24rem
</style>
